import React, { Component } from 'react';
import { Spin } from 'antd';
import PropTypes from 'prop-types';
import style from './index.less';

class LineChart extends Component {
  static propTypes = {
    chartID: PropTypes.string,
    curDesc: PropTypes.string,
  };

  static defaultProps = {
    chartID: 'financialChart',
    curDesc: '',
  };

  render() {
    const { curDesc, chartID } = this.props;
    return (
      <div>
        <div id={chartID} style={{ width: '800px', height: '500px' }} />
        <div style={{ margin: '0 50px' }}>
          <h4 className={style.descTitle}>指标解释</h4>
          {curDesc}
        </div>
      </div>
    );
  }
}

// const mapStateToProps = state => ({
//   curDesc: state.finance.curDesc,
//   isLoading: state.loading.effects['finance/getCharts'],
// });
export default LineChart;
